package _04方法引用.引用成员方法;

import java.security.CodeSource;
import java.util.Date;

public class Demo01 {

    public static void main(String[] args) {
        Date d = new Date();

        show(new TimeUtil() {
            @Override
            public long getTime() {
                return d.getTime();
            }
        });

    }


    public static long show(TimeUtil timeUtil){
        long time = timeUtil.getTime();
        System.out.println(time);
        return time;

    }
}
interface TimeUtil{

    long getTime();
}
